#ifndef JOB_H_
#define JOB_H_

#include "Thread.h"
#include <string>

using namespace std;

class CJob
{
public:
	CJob() :
		m_iJobID(0),
		m_strJobName(""),
		m_pWorkThread(NULL)
	{

	}
	virtual ~CJob()
	{

	}

	virtual void Execute(void * ptr) = 0;

public:
	CThread * GetWorkThread();
	void SetWorkThread(CThread * pThread);

	int GetJobID();
	void SetJobID(int iJobID);

	string GetJobName();
	void SetJobName(string strJobName);

private:
	int m_iJobID;
	string m_strJobName;
	CThread * m_pWorkThread;
};

inline CThread* CJob::GetWorkThread()
{
	return m_pWorkThread;
}

inline void CJob::SetWorkThread(CThread * pThread)
{
	m_pWorkThread = pThread;
}

inline int CJob::GetJobID()
{
	return m_iJobID;
}

inline void CJob::SetJobID(int iJobID)
{
	m_iJobID = iJobID;
}

inline string CJob::GetJobName()
{
	return m_strJobName;
}

inline void CJob::SetJobName(string strJobName)
{
	m_strJobName = strJobName;
}

#endif